<div :class="{ 'grid': true, 'show-paging-bar': isEnablePagingBar, 'hidden-paging-bar': !isEnablePagingBar }">
    <i-form>
        <el-table v-if="isDisplay === true"
            :default-sort="{ prop: minorSortPSDEF, order: Object.is(minorSortDir, 'ASC') ? 'ascending' : Object.is(minorSortDir, 'DESC') ? 'descending' : '' }"  
            @sort-change="onSortChange($event)"  
            :border="isDragendCol"
            :highlight-current-row ="isSingleSelect"
            :row-class-name="getRowClassName.bind(_self)"
            :cell-class-name="getCellClassName.bind(_self)"
            size="mini"
            stripe
            :height="tableHeight"
            @row-click="rowClick($event)"  
            @select-all="selectAll($event)"  
            @select="select.apply(_self, arguments)"  
            @row-class-name="onRowClassName($event)"  
            @row-dblclick="rowDBLClick($event)"  
            ref="multipleTable" :data="items" :show-header="!isHideHeader"
        >
            <template slot="empty">
                {{$t('entities.emasset.main3_grid.nodata')}} 
                <span class="quick-toolbar">
                </span>
            </template>
            <template v-if="!isSingleSelect">
                <el-table-column align="center" type="selection" :width="checkboxColWidth"></el-table-column>
            </template>
            <template v-if="getColumnState('assetsort')">
                <el-table-column show-overflow-tooltip :prop="'assetsort'" :label="$t('entities.emasset.main3_grid.columns.assetsort')" :width="120"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.assetsort')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <span>{{row.assetsort}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('assetcode')">
                <el-table-column show-overflow-tooltip :prop="'assetcode'" :label="$t('entities.emasset.main3_grid.columns.assetcode')" :width="120"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.assetcode')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <span>{{row.assetcode}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('emassetname')">
                <el-table-column show-overflow-tooltip :prop="'emassetname'" :label="$t('entities.emasset.main3_grid.columns.emassetname')" :width="160"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.emassetname')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <app-column-link
                            deKeyField="emasset"
                            :context="JSON.parse(JSON.stringify(context))"
                            :viewparams="JSON.parse(JSON.stringify(viewparams))"
                            :data="row"
                            :linkview="{viewname: 'emassetedit-view9', height: 0,width: 0,title: $t('entities.emasset.views.editview9.title'),placement: 'DRAWER_TOP', isRedirectView: false,deResParameters: [
            ]
            ,parameters: [
            { pathName: 'emassets', parameterName: 'emasset' },
            { pathName: 'editview9', parameterName: 'editview9' }
            ]}"
                            valueitem="srfkey"
                        >
                            <span>{{row.emassetname}}</span>
                        </app-column-link>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('num')">
                <el-table-column show-overflow-tooltip :prop="'num'" :label="$t('entities.emasset.main3_grid.columns.num')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.num')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <span>{{row.num}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('assettype')">
                <el-table-column show-overflow-tooltip :prop="'assettype'" :label="$t('entities.emasset.main3_grid.columns.assettype')" :width="120"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.assettype')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template >
            <codelist :value="row.assettype" tag="EMASSETTYPE" codelistType="STATIC" ></codelist>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('assetlct')">
                <el-table-column show-overflow-tooltip :prop="'assetlct'" :label="$t('entities.emasset.main3_grid.columns.assetlct')" :width="150"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.assetlct')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <span>{{row.assetlct}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('eqmodelcode')">
                <el-table-column show-overflow-tooltip :prop="'eqmodelcode'" :label="$t('entities.emasset.main3_grid.columns.eqmodelcode')" :width="150"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.eqmodelcode')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <span>{{row.eqmodelcode}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('assetclassname')">
                <el-table-column show-overflow-tooltip :prop="'assetclassname'" :label="$t('entities.emasset.main3_grid.columns.assetclassname')" :width="160"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.assetclassname')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <app-column-link
                            deKeyField="emassetclass"
                            :context="JSON.parse(JSON.stringify(context))"
                            :viewparams="JSON.parse(JSON.stringify(viewparams))"
                            :data="row"
                            :linkview="{viewname: 'emassetclassedit-view-4778', height: 0,width: 1000,title: $t('entities.emassetclass.views.editview_4778.title'),placement: 'DRAWER_RIGHT', isRedirectView: false,deResParameters: [
            ]
            ,parameters: [
            { pathName: 'emassetclasses', parameterName: 'emassetclass' },
            { pathName: 'editview_4778', parameterName: 'editview_4778' }
            ]}"
                            valueitem="assetclassid"
                        >
                            <span>{{row.assetclassname}}</span>
                        </app-column-link>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('assetstate')">
                <el-table-column show-overflow-tooltip :prop="'assetstate'" :label="$t('entities.emasset.main3_grid.columns.assetstate')" :width="120"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.assetstate')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template >
            <codelist :value="row.assetstate" tag="EMASSETSTATE" codelistType="STATIC" ></codelist>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('eqlife')">
                <el-table-column show-overflow-tooltip :prop="'eqlife'" :label="$t('entities.emasset.main3_grid.columns.eqlife')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.eqlife')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <app-format-data dataType="FLOAT" precision="0" :data="row.eqlife"></app-format-data>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('eqstartdate')">
                <el-table-column show-overflow-tooltip :prop="'eqstartdate'" :label="$t('entities.emasset.main3_grid.columns.eqstartdate')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.eqstartdate')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <app-format-data format="YYYY-MM-DD" :data="row.eqstartdate"></app-format-data>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('originalcost')">
                <el-table-column show-overflow-tooltip :prop="'originalcost'" :label="$t('entities.emasset.main3_grid.columns.originalcost')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.originalcost')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <app-format-data dataType="CURRENCY" precision="0" :data="row.originalcost"></app-format-data>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('deptname')">
                <el-table-column show-overflow-tooltip :prop="'deptname'" :label="$t('entities.emasset.main3_grid.columns.deptname')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.deptname')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <span>{{row.deptname}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('purchdate')">
                <el-table-column show-overflow-tooltip :prop="'purchdate'" :label="$t('entities.emasset.main3_grid.columns.purchdate')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.purchdate')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <app-format-data format="YYYY-MM-DD" :data="row.purchdate"></app-format-data>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('empname')">
                <el-table-column show-overflow-tooltip :prop="'empname'" :label="$t('entities.emasset.main3_grid.columns.empname')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.empname')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <span>{{row.empname}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('unitname')">
                <el-table-column show-overflow-tooltip :prop="'unitname'" :label="$t('entities.emasset.main3_grid.columns.unitname')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.unitname')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <app-column-link
                            deKeyField="pfunit"
                            :context="JSON.parse(JSON.stringify(context))"
                            :viewparams="JSON.parse(JSON.stringify(viewparams))"
                            :data="row"
                            :linkview="{viewname: 'pfunitedit-view', height: 0,width: 500,title: $t('entities.pfunit.views.editview.title'),placement: 'DRAWER_RIGHT', isRedirectView: false,deResParameters: [
            ]
            ,parameters: [
            { pathName: 'pfunits', parameterName: 'pfunit' },
            { pathName: 'editview', parameterName: 'editview' }
            ]}"
                            valueitem="unitid"
                        >
                            <span>{{row.unitname}}</span>
                        </app-column-link>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('ytzj')">
                <el-table-column show-overflow-tooltip :prop="'ytzj'" :label="$t('entities.emasset.main3_grid.columns.ytzj')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.ytzj')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <app-format-data dataType="FLOAT" precision="0" :data="row.ytzj"></app-format-data>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('replacerate')">
                <el-table-column show-overflow-tooltip :prop="'replacerate'" :label="$t('entities.emasset.main3_grid.columns.replacerate')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.replacerate')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <app-format-data dataType="FLOAT" precision="0" :data="row.replacerate"></app-format-data>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('mgrdeptname')">
                <el-table-column show-overflow-tooltip :prop="'mgrdeptname'" :label="$t('entities.emasset.main3_grid.columns.mgrdeptname')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.mgrdeptname')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <span>{{row.mgrdeptname}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('rempname')">
                <el-table-column show-overflow-tooltip :prop="'rempname'" :label="$t('entities.emasset.main3_grid.columns.rempname')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.rempname')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <span>{{row.rempname}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('eqserialcode')">
                <el-table-column show-overflow-tooltip :prop="'eqserialcode'" :label="$t('entities.emasset.main3_grid.columns.eqserialcode')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.eqserialcode')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <span>{{row.eqserialcode}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('blsystemdesc')">
                <el-table-column show-overflow-tooltip :prop="'blsystemdesc'" :label="$t('entities.emasset.main3_grid.columns.blsystemdesc')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.blsystemdesc')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <span>{{row.blsystemdesc}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('keyattparam')">
                <el-table-column show-overflow-tooltip :prop="'keyattparam'" :label="$t('entities.emasset.main3_grid.columns.keyattparam')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.keyattparam')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <span>{{row.keyattparam}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('now')">
                <el-table-column show-overflow-tooltip :prop="'now'" :label="$t('entities.emasset.main3_grid.columns.now')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.now')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <app-format-data dataType="FLOAT" precision="0" :data="row.now"></app-format-data>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('replacecost')">
                <el-table-column show-overflow-tooltip :prop="'replacecost'" :label="$t('entities.emasset.main3_grid.columns.replacecost')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.replacecost')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <app-format-data dataType="FLOAT" precision="0" :data="row.replacecost"></app-format-data>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('lastzjdate')">
                <el-table-column show-overflow-tooltip :prop="'lastzjdate'" :label="$t('entities.emasset.main3_grid.columns.lastzjdate')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.lastzjdate')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <app-format-data format="YYYY-MM-DD" :data="row.lastzjdate"></app-format-data>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('syqx')">
                <el-table-column show-overflow-tooltip :prop="'syqx'" :label="$t('entities.emasset.main3_grid.columns.syqx')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.syqx')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <span>{{row.syqx}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('jtsb')">
                <el-table-column show-overflow-tooltip :prop="'jtsb'" :label="$t('entities.emasset.main3_grid.columns.jtsb')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.emasset.main3_grid.columns.jtsb')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <span>{{row.jtsb}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="adaptiveState">
                <el-table-column></el-table-column>
            </template>
        </el-table>
        <row class="grid-pagination" v-show="items.length > 0">
            <page class="pull-right" @on-change="pageOnChange($event)" 
                @on-page-size-change="onPageSizeChange($event)"
                :total="totalRecord"
                show-sizer :current="curPage" :page-size="limit"
                :page-size-opts="[10, 20, 30, 40, 50, 60, 70, 80, 90, 100]" show-elevator show-total>
                <span>
                    <span class="page-column">
                        <poptip transfer-class-name="grid-column" transfer placement="top-start">
                            <i-button icon="md-menu">{{$t('app.gridpage.choicecolumns')}}</i-button>
                            <div slot="content">
                                <template v-for="col in allColumns">
                                    <div :key="col.name"><el-checkbox v-model="col.show" @change="onColChange()">{{$t(col.langtag)}}</el-checkbox></div>
                                </template>
                            </div>
                        </poptip>
                    </span>
                    <span class="page-button"><i-button icon="md-refresh" :title="$t('app.gridpage.refresh')" @click="pageRefresh()"></i-button></span>&nbsp;
                    <span>
                        {{$t('app.gridpage.show')}}&nbsp;
                        <span>
                            <template v-if="items.length === 1">
                            1
                            </template>
                            <template v-else>
                                <span>{{(curPage - 1) * limit + 1}}&nbsp;-&nbsp;{{totalRecord > curPage * limit ? curPage * limit : totalRecord}}</span>
                            </template>
                        </span>&nbsp;
                        {{$t('app.gridpage.records')}}，{{$t('app.gridpage.totle')}}&nbsp;{{totalRecord}}&nbsp;{{$t('app.gridpage.records')}}
                    </span>
                </span>
            </page>
        </row>
    </i-form>
</div>